/* eslint-disable */
import axios from 'axios'

// 创建一个新的Axios实例
const instance = axios.create({
  baseURL: 'http://localhost:3000' // 设置基本URL
})

// 封装GET请求
export const get = (url, params) => {
  return instance({
    method: 'get',
    url,
    params
  })
}

// 封装POST请求
export const post = (url, data) => {
  return instance({
    method: 'post',
    url,
    data
  })
}

// 封装PUT请求
export const put = (url, data) => {
  return instance({
    method: 'put',
    url,
    data
  })
}

// 封装DELETE请求
export const del = (url) => {
  return instance({
    method: 'delete',
    url
  })
}